<template>
	<view class="padding0-30">
		<!-- 导肮栏 -->
		<view class="example-body">
			<uni-nav-bar :fixed="true" :border="false" :shadow="false" color="#333333" background-color="#fafafa" @clickLeft="showCity" @clickRight="scan" >
				<block slot="left">
					<view class="city">
						<uni-icons type="location-filled" color="#333333" size="16" />
						<text class="uni-nav-bar-text">{{ city }}</text>
					</view>
				</block>
				<view class="input-view">
					<uni-icons class="input-uni-icon" type="search" size="22" color="#666666" />
					<input confirm-type="search" class="nav-bar-input" type="text" placeholder="输入搜索关键词" @confirm="confirm">
				</view>
				<block slot="right">
					<uni-icons type="scan" color="#333333" size="16" />
				</block>
			</uni-nav-bar>
		</view>
		<!-- <uniCityPicker showPicker="true"></uniCityPicker> -->
		<view>
			<consult></consult>
		</view>
	</view>
</template>

<script>
	import consult from '@/pages/consult/consult.vue'
	import uniCityPicker from '../../components/uni-cityPicker/uni-cityPicker.vue';
	export default {
		components:{uniCityPicker,consult},
		data() {
			return {
				city:'杭州',
			}
		},
		onShow() {
			// const _this=this,
			uni.getStorage({
				key:'locationCity',
				success: (res) => {
					// console.log(res.data)
					this.city=res.data
				}
			})
		},
		methods: {
			clickLeft() {
			
				uni.showToast({
					title: '左侧按钮'
				})
			},
			search() {
				uni.showToast({
					title: '搜索'
				})
			},
			showCity() {
				uni.navigateTo({
					url:'/pages/select-city/select-city'
				})
			},
			scan() {
				uni.showToast({
					title: '扫码'
				})
			},
			confirm() {
				uni.showToast({
					title: '搜索'
				})
			},
		},
	}
</script>

<style>

</style>
